<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: main.cpp File Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_70834f0dcd10de01d2e35ab402a2238e.html">tysonjones</a></li><li class="navelem"><a class="el" href="dir_1957401ef452be7528010ba0f4832a45.html">Desktop</a></li><li class="navelem"><a class="el" href="dir_dee4414d5d72b49a9429e079789ffd08.html">GithubRepos</a></li><li class="navelem"><a class="el" href="dir_a89b43d59316bb5045aa22bb53a67d29.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_e791dcdec8c5d319683d04485e4067ac.html">tests</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">main.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;catch.hpp&quot;</code><br />
<code>#include &quot;<a class="el" href="QuEST_8h_source.html">QuEST.h</a>&quot;</code><br />
</div>
<p><a href="main_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a34b4c3eca7342fbc4cba090d02139902"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a34b4c3eca7342fbc4cba090d02139902">CATCH_CONFIG_RUNNER</a></td></tr>
<tr class="memdesc:a34b4c3eca7342fbc4cba090d02139902"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use our modified Catch in custom-main mode (main defined below).  <a href="main_8cpp.html#a34b4c3eca7342fbc4cba090d02139902">More...</a><br /></td></tr>
<tr class="separator:a34b4c3eca7342fbc4cba090d02139902"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga51a64b05d31ef9bcf6a63ce26c0092db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__debug.html#ga51a64b05d31ef9bcf6a63ce26c0092db">invalidQuESTInputError</a> (const char *errMsg, const char *errFunc)</td></tr>
<tr class="memdesc:ga51a64b05d31ef9bcf6a63ce26c0092db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Redefinition of QuEST_validation's invalidQuESTInputError function, called when a user passes an incorrect parameter (e.g.  <a href="group__debug.html#ga51a64b05d31ef9bcf6a63ce26c0092db">More...</a><br /></td></tr>
<tr class="separator:ga51a64b05d31ef9bcf6a63ce26c0092db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
<tr class="memdesc:a0ddf1224851353fc92bfbff6f499fa97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicit declaration of main to create (destroy) the <a class="el" href="structQuESTEnv.html" title="Information about the environment the program is running in.">QuESTEnv</a> before (after) invoking the Catch unit tests.  <a href="main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">More...</a><br /></td></tr>
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a718130cc1fc36cde991aff3d4c85c47d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structQuESTEnv.html">QuESTEnv</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a718130cc1fc36cde991aff3d4c85c47d">QUEST_ENV</a></td></tr>
<tr class="memdesc:a718130cc1fc36cde991aff3d4c85c47d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The global <a class="el" href="structQuESTEnv.html" title="Information about the environment the program is running in.">QuESTEnv</a> instance, to be created and destroyed once in this <a class="el" href="main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97" title="Explicit declaration of main to create (destroy) the QuESTEnv before (after) invoking the Catch unit ...">main()</a>, so that the MPI environment is correctly created once when running distributed unit tests.  <a href="main_8cpp.html#a718130cc1fc36cde991aff3d4c85c47d">More...</a><br /></td></tr>
<tr class="separator:a718130cc1fc36cde991aff3d4c85c47d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This file is left mostly empty so that catch doesn't need slow (~16s) recompilation each time unit tests are edited</p>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition in file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a34b4c3eca7342fbc4cba090d02139902"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34b4c3eca7342fbc4cba090d02139902">&#9670;&nbsp;</a></span>CATCH_CONFIG_RUNNER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CATCH_CONFIG_RUNNER</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use our modified Catch in custom-main mode (main defined below). </p>
<p>catch.hpp was modified to, in distributed mode, output only once. </p>

<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00011">11</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a0ddf1224851353fc92bfbff6f499fa97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicit declaration of main to create (destroy) the <a class="el" href="structQuESTEnv.html" title="Information about the environment the program is running in.">QuESTEnv</a> before (after) invoking the Catch unit tests. </p>

<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00034">34</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                                   {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <a class="code" href="main_8cpp.html#a718130cc1fc36cde991aff3d4c85c47d">QUEST_ENV</a> = <a class="code" href="group__type.html#ga8ba2c3388dd64d9348c3b091852d36d4">createQuESTEnv</a>();</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keywordtype">int</span> result = Catch::Session().run( argc, argv );</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <a class="code" href="group__type.html#gaeff624226629d7063a8a776958a4f991">destroyQuESTEnv</a>(<a class="code" href="main_8cpp.html#a718130cc1fc36cde991aff3d4c85c47d">QUEST_ENV</a>);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__cpu__distributed_8c_source.html#l00129">createQuESTEnv()</a>, <a class="el" href="QuEST__cpu__distributed_8c_source.html#l00172">destroyQuESTEnv()</a>, and <a class="el" href="main_8cpp_source.html#l00020">QUEST_ENV</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a718130cc1fc36cde991aff3d4c85c47d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a718130cc1fc36cde991aff3d4c85c47d">&#9670;&nbsp;</a></span>QUEST_ENV</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structQuESTEnv.html">QuESTEnv</a> QUEST_ENV</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The global <a class="el" href="structQuESTEnv.html" title="Information about the environment the program is running in.">QuESTEnv</a> instance, to be created and destroyed once in this <a class="el" href="main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97" title="Explicit declaration of main to create (destroy) the QuESTEnv before (after) invoking the Catch unit ...">main()</a>, so that the MPI environment is correctly created once when running distributed unit tests. </p>
<p>The single <a class="el" href="structQuESTEnv.html" title="Information about the environment the program is running in.">QuESTEnv</a> environment created before the Catch tests begin, and destroyed thereafter. </p>

<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00020">20</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l00701">areEqual()</a>, <a class="el" href="main_8cpp_source.html#l00034">main()</a>, <a class="el" href="test__calculations_8cpp_source.html#l00015">TEST_CASE()</a>, <a class="el" href="utilities_8cpp_source.html#l00896">toQMatrix()</a>, <a class="el" href="utilities_8cpp_source.html#l01026">toQureg()</a>, and <a class="el" href="utilities_8cpp_source.html#l00938">toQVector()</a>.</p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="agroup__type_html_gaeff624226629d7063a8a776958a4f991"><div class="ttname"><a href="group__type.html#gaeff624226629d7063a8a776958a4f991">destroyQuESTEnv</a></div><div class="ttdeci">void destroyQuESTEnv(QuESTEnv env)</div><div class="ttdoc">Destroy the QuEST environment.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__distributed_8c_source.html#l00172">QuEST_cpu_distributed.c:172</a></div></div>
<div class="ttc" id="amain_8cpp_html_a718130cc1fc36cde991aff3d4c85c47d"><div class="ttname"><a href="main_8cpp.html#a718130cc1fc36cde991aff3d4c85c47d">QUEST_ENV</a></div><div class="ttdeci">QuESTEnv QUEST_ENV</div><div class="ttdoc">The global QuESTEnv instance, to be created and destroyed once in this main(), so that the MPI enviro...</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00020">main.cpp:20</a></div></div>
<div class="ttc" id="agroup__type_html_ga8ba2c3388dd64d9348c3b091852d36d4"><div class="ttname"><a href="group__type.html#ga8ba2c3388dd64d9348c3b091852d36d4">createQuESTEnv</a></div><div class="ttdeci">QuESTEnv createQuESTEnv(void)</div><div class="ttdoc">Create the QuEST execution environment.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu__distributed_8c_source.html#l00129">QuEST_cpu_distributed.c:129</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
